home *** CD-ROM | disk | FTP | other *** search
- #ifndef _ZLIB_H
- #define _ZLIB_H 1
-
- /*
- * header for for zlib (compress file i/o utilities)
- */
-
- #include <stdio.h>
-
- #if defined(MSDOS) && !defined(__GNUC__)
- # define PC_HUGE huge /* Microsoft C and contemptibles */
- #else
- # define PC_HUGE
- #endif
-
- #if defined(unix) || defined(__unix)
- #define ZEXT ".Z" /* "normal" compressed file ext */
- #else
- #define ZEXT "Z" /* "normal" compressed file ext */
- #endif
-
- #ifdef __arm
- # undef ZEXT
- # define ZEXT "-z"
- #endif
-
- #define Z_BITS 16
- #define Z_MAXBUF 256
-
-
-
- /*
- * the major data structure, ZFILE
- */
- typedef struct zfiletype
- {
- FILE *file;
- int flags;
- int n_bits; /* number of bits/code */
- int maxbits; /* user settable max # bits/code */
- long maxcode; /* maximum code, given n_bits */
- long free_ent; /* first unused entry */
- int block_compress;
- int clear_flg;
-
- long stackp;
- long finchar;
- long code,
- oldcode,
- incode;
- int offset,
- size;
- unsigned char buf[Z_BITS]; /* Passed to getcode */
- unsigned char PC_HUGE *tab_suffixof;
- /* There is a flag bit to say whether*/
- long PC_HUGE *tab_prefixof; /* these have been allocated. */
- int init;
-
- int bufput,
- bufget,
- bufend;
- unsigned char buff[Z_MAXBUF];
- int c1,
- c2;
- int zeof;
-
- } ZFILE;
-
-
- /*
- * function prototypes...
- */
- #if defined(__STDC__)
- ZFILE *zfopen(char *fileptr, char *how);
- void zfclose(ZFILE *z);
- ZFILE *zfilter(FILE *f);
- int zfgetc(ZFILE *z);
- int zfeof(ZFILE *z);
- char *zfgets(char *line, int len, ZFILE *zfp);
- #else
- ZFILE *zfopen();
- void zfclose();
- ZFILE *zfilter();
- int zfgetc();
- int zfeof();
- char *zfgets();
- #endif
-
- #endif /*_ZLIB_H*/
-